home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / objcissu.lha / encapsulation < prev    next >
Internet Message Format  |  1993-03-01  |  2KB

  1. Date: Tue, 15 Sep 92 10:36:31 CDT
  2. From: billb@jupiter.fnbc.com
  3. To: gnu-objc@prep.ai.mit.edu
  4. Subject: Re: method pre and post code messages
  5. Cc: athan@object.com (Andrew Athan)
  6.  
  7.  
  8. > > billb@fnbc.com (Bill Burcham) writes:
  9. > > Also, while I have your ear, wouldn't it be nice to have some more 
  10. > > powerful reflective facilities in the language.  Maybe I just need to 
  11. > > dig deeper into Obj-C++, but I haven't seen the kind of facilities 
  12. > > that I really need.  If such changes are _off_limits_ for this 
  13. > > projects then just stop reading _now_.
  14. > >
  15. > > An example of a useful reflective capability would be the ability to 
  16. > > override an Object method that would automatically get invoked every 
  17. > > time any method is entered; I would also like a similar method for 
  18. > > method exit.  I would like to be able to override these methods for a 
  19. > > given class, and additionally for particular instances of a class.
  20. >
  21. > Object Oriented languages do not generally support this
  22. > feature.  Specifically, Obj-c does not support this
  23. > feature.  It would remove the systemic benefits of object
  24. > oriented encapsulation.  However, Obj-c retains the
  25. > extensibility of C; this allows you to implement these
  26. > features as you see fit.
  27. >
  28. > Ben Tucker
  29. > Ben_Tucker@mcimail.com
  30.  
  31. Thanks for your input Ben.
  32.  
  33. What do you mean by: `remove the systemic benefits of object oriented encapsulation'?  If you look at the references I cited in my original posting, I believe you will agree that no encapsulation is lost (it is pointless for me to argue the point in this space -- I would just end up quoting those papers).
  34.  
  35. BTW this is just _one_ of the powerful tools mentioned in those papers.  They also mention features such as Smalltalk and Lisp's ability to interpret data as code (which I would also like).  As we get mega-fast machines, what is the point of limiting ourselves to static code?
  36.  
  37. Yes, I agree that Obj-C does _not_ support overriding message handling behavior in the manner proposed in my original posting.  My point is that I would like it to support this feature and perhaps many more.  While `Obj-c retains the extensibility of C', I would like it to be much more extensible than C.  I _have_ implemented the aforementioned features in Obj-C `as [I] [saw] fit' in an app I recently wrote, and found that it involved my bracketing certain methods in just the manner described in the papers.  This caused me to pause and think -- hey maybe those guys have a valid point.
  38.  
  39. Bill
  40.  
  41.